FROM java:8

VOLUME /temp

ADD spark-server-1.0-SNAPSHOT.jar  app.jar

RUN bash -c 'touch /app.jar'

ENV JAVA_HOME /usr/local/jdk1.8.0_151
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /usr/local/apache-tomcat-7.0.82
ENV CATALINA_BASE /usr/local/apache-tomcat-7.0.82
ENV PATH $PATH:$JAVA_HOME/BIN:$CATALINA_HOME/lib:$CATALINA_HOME/bin

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]